package unidad4;

public class Operators {

	private static int nNum;
	private static String sLet;
	private static double nDou;
	private static char cCh;
	
	public void methodNumber(){
		
		nNum = 5 * 3;
		System.out.println("5 * 3 = "+nNum);
		nDou = 7.25 + 0.35;
		System.out.println("7.25 + 0.35 = "+nDou);
		System.out.println(nDou+" + "+nNum+" = "+nDou+nNum);
		nDou += nNum;
		sLet = new String("Test ") + new String (" Test2");
		System.out.println(sLet +"\n \n \n");
		
		
	}
	
	public void methodTable(){
			
		System.out.println("Operation| Action \t | Example \t | Type \t | Result");
		nNum = 233+54;
		System.out.println("+ \t | Add \t \t | 233 + 54 \t | Integer \t |"+nNum);
		nNum = 55-26;
		System.out.println("- \t | Subtract \t | 55 - 26 \t | Integer \t |"+nNum);
		nDou = 52.0 * 90.0;
		System.out.println("* \t | Multiply \t | 52.0 * 90.0 \t | Double \t |"+nDou);
		nDou = 62.0 / 16.0;
		System.out.println("/ \t | Division \t | 62.0 / 16.0 \t | Double \t |"+nDou);
		nNum = 86 % 13;
		System.out.println("% \t | Remainder \t | 86 % 13 \t | Integer \t |"+nNum);
		nDou = 83 % 13 +233-55*3/5;
		System.out.println("%*/+- \t | Order \t | 83 % 13 +233-55*3/5 \t | Double \t |"+nDou+"\n \n \n");
		
	}
	
	public void methodString(){
		
		System.out.println("this " + "string " + "has " + "spaces ");
		System.out.println("this" + "string" + "has" + "no" + "spaces");
		System.out.println("the sum of " + 6 + " + " + 10 + " is " + (6 + 10));
		System.out.println("the sum of " + "6 + 10" + " is " + (6 + 10));
		System.out.println(6 + 10 + " equals " + (6 + 10));
		System.out.println("" + 6 + "+" + 10 + " equals " + 6 + 10+"\n \n \n");
		
	}
	
	public void methodBoolean(){
		
		System.out.println("3 > 7 = " +(3 > 7));
		System.out.println("(3 > 7) || (4 < 9) = "+((3 > 7) || (4 < 9))); 
		System.out.println("135 == 100 + 35 = "+(135 == 100 + 35)); 
		System.out.println("(true && false) || (true || false) = "+((true && false) || (true || false)));
		System.out.println("(3 > 7) || ((10 < 9) == (3 == 8)) = "+((3 > 7) || ((10 < 9) == (3 == 8))));
		System.out.println("false || !(3 > 7) = "+(false || !(3 > 7))+"\n \n \n");
		
	}
	
}
